home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / cross / sasmv14.dms / sasmv14.adf / examples / fwdref.s < prev    next >
Text File  |  1993-05-22  |  1KB  |  61 lines

  1.  
  2. *******************************************
  3. **
  4. ** How forward references work ?
  5. **
  6. ** © 1993 by Infernal Byte Systems, INC.
  7. **
  8. *******************************************
  9.  
  10.     heap    O=1024
  11.  
  12. flo=    xxx-xx                ;size of some code
  13. flo2=    flo*2                ;double size of some code
  14.  
  15.     exp=flo2            ;show us the code...
  16.  
  17. aa=    100                ;some label
  18.  
  19.     ds.b    100,0
  20.     ds.b    aa,0
  21.  
  22. xx:    lda    aa
  23. xxx:    cmp    aa
  24.     ldx    aa
  25.  
  26.     exp=    aa            ;show us some label
  27.  
  28.     .say !
  29.     .say PASS ONE FINISHED
  30.  
  31.  
  32.  
  33. - The above code will (for example) create the following log-file:
  34. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  35. -
  36. -1>sasm src/fwdref.s stat
  37. -
  38. -WD65C816 S-NES Macro Assembler v1.0 [MC68030] © 1992/3 by Infernal Byte, INC.
  39. -written by Florian W. Sauer & Stefan M. Schulze - 24/11/1992
  40. -
  41. -[reading][assembling]
  42. -
  43. -[exp] at #26 PC=$0080CE evaluates to 100 (=$000064)
  44. -
  45. -PASS ONE FINISHED
  46. -
  47. -[exp] at #15 PC=$008000 evaluates to 4 (=$000004)
  48. -
  49. -[writing][done]
  50. -
  51. -STATS: Overall 30 lines of code have been assembled with 0 warning(s)
  52. -       in 0.12 seconds into 206 bytes of objectcode. That means an avg
  53. -       speed of 230 LPS or 13800 LPM. Oh,no... using 3.58MHZ clock?
  54. -       The 5 labels produced only 0 collision(s) in the hasharea and
  55. -       about 3 forward references have been resolved.
  56. -       I've utilized 1044577 bytes of ram to assemble, i.e. 13% of your
  57. -       memory capacities were used. 
  58.  
  59. * You see how it works? Watch the exp in source & when they're outputted...
  60. * Thats the way the cookie crumbles..
  61.